package com.owen.count.down.latch.simple1;

import java.util.concurrent.CountDownLatch;

public class MyRunnable1 implements Runnable {

    private CountDownLatch countDownLatch;

    private Integer index;

    public MyRunnable1(CountDownLatch countDownLatch, Integer index){
        this.countDownLatch=countDownLatch;
        this.index=index;
    }

    @Override
    public void run() {
        this.countDownLatch.countDown();
        System.out.println("玩家"+this.index+"准备完成！");
    }
}
